<template>
  <div>
    <OrderHeader :title="title">
      <template v-slot:tip>
        <span>{{tip}}</span>
      </template>
    </OrderHeader>
    <router-view></router-view>
    <Servies></Servies>
    <NavFooter></NavFooter>
  </div>
</template>

<script>
import OrderHeader from "../components/base/OrderHeader";
import Servies from "../components/base/Servies";
import NavFooter from "../components/nav-footer";

export default {
  name: 'order',
  components: {NavFooter, Servies, OrderHeader},
  data () {
    return {
      title: '',
      tip: ''
    }
  },
  mounted () {
    const path = this.$route.path
    if (path === '/order/cart') {
      this.title = ''
    } else if (path === '/order/confirm') {
      this.title = '确认订单'
    } else if (path === '/order/list') {
      this.title = '订单列表'
      this.tip = '请谨防钓鱼链接或诈骗电话，了解更多'
    } else if (path === '/order/pay') {
      this.title = '支付订单'
      this.tip = ''
    } else if (path === '/order/aliPay') {
      this.title = '支付订单'
      this.tip = '请谨防钓鱼链接或诈骗电话，了解更多'
    } else {
      this.title = '默认'
      this.tip = '没有提示'
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
